#!/bin/sh
#自行进入淘宝一起赢20亿红包-做任务赚喵糖

dosedbasex=
dosedbasey=

sectionname=$(echo $0 | cut -d '/' -f 3 | cut -d '_' -f 1 | sed 's/^ADBRUN//')
adbclient=$(uci get adbrun.$sectionname.adbiplist)
rm /tmp/adb_ADBRUN${sectionname}_.sh

adb disconnect ${adbclient}:5555
sleep 2
adb connect ${adbclient}:5555
sleep 2

ltimes=0
while [ $ltimes -lt 40 ]
do
	adb -s ${adbclient}:5555 shell input tap $basex $basey
	sleep 30
	adb -s ${adbclient}:5555 shell input keyevent 4
	sleep 6
	ltimes=$(echo `expr $ltimes + 1`)
done
